package classes;

import java.sql.Date;
import java.sql.SQLException;

public class LifebookUser {
    private String username;
    private String email;
    private String password;
    private String firstName;
    private String lastName;
    private char sex;
    private Date birthDay;
    private String aboutMe;
    private boolean isEnabled;
    
    public LifebookUser(String username, String email, String password, String firstName, String lastName, char sex, Date birthDay, String aboutMe, boolean isEnabled) {
        this.username = username;
        this.email = email;
        this.password = password;
        this.firstName = firstName;
        this.lastName = lastName;
        this.sex = sex;
        this.birthDay = birthDay;
        this.aboutMe = aboutMe;
        this.isEnabled = isEnabled;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
    }

    public String getAboutMe() {
        return aboutMe;
    }

    public void setAboutMe(String aboutMe) {
        this.aboutMe = aboutMe;
    }

    public boolean isIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(boolean isEnabled) {
        this.isEnabled = isEnabled;
    }
    
    public int getFollowerCount() throws SQLException, ClassNotFoundException{
        return DB.getFollowerCount(username);
    }
    
    public int getFollowingCount() throws SQLException, ClassNotFoundException{
        return DB.getFollowingCount(username);
    }
}
